const db = wx.cloud.database()
Page({
  data: {
    myorder_list: []
  },

  onShow: function () {
    var userInfo = wx.getStorageSync('userInfo');
    if (userInfo == "") {
      wx.navigateTo({
        url: '../auth/auth'
      })
    } else {
      db.collection('order').where({
        _openid: userInfo._openid
      }).orderBy('submitorder', 'desc').get().then(res => {
        this.setData({
          myorder_list: res.data
        })
      })
    }

  },

})